/*
 * @Author: LiuHaiL 18655112670@139.com
 * @Date: 2023-08-03 13:39:56
 * @LastEditors: LiuHaiL 18655112670@139.com
 * @LastEditTime: 2023-08-28 15:44:12
 * @FilePath: \general-admin\src\api\backend\promote\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import createAxios from '/@/utils/axios'

import { promotionUrl,videoUrl } from '/@/api/controllerUrls'



export function selectAccount(ids: string) {
    return createAxios({
        url: promotionUrl + 'select-account',
        method: 'post',
        data: {
            ids: ids,
        },
    })
}


export function toLoadVideoAndImg(ids: string) {
    return createAxios({
        url: promotionUrl + 'toLoadMaterial',
        method: 'post',
        data: {
            ids: ids,
        },
    })
}


export function getVideoList() {
    return createAxios({
        url: videoUrl + 'list',
        method: 'get'
    })
}


export function submitVideoApi(data: anyObj) {
    return createAxios({
        url: videoUrl + 'submit-video',
        method: 'post',
        data:data,
    })
}

// 获取项目
export function getProjectAllByAdID(ids: string) {
    return createAxios({
        url: promotionUrl + 'getProjectList',
        method: 'post',
        data: {
            ids: ids,
        },
    })
}



export function getAccountSearch(data: anyObj) {
    return createAxios({
        url: promotionUrl + 'iesAccountSearch',
        method: 'post',
        data:data,
    },{
        showSuccessMessage: true,
    })
}

export function createAd(data: anyObj) {
    return createAxios({
        url: promotionUrl + 'createAdInfo',
        method: 'post',
        data:data,
    },{
        showSuccessMessage: true,
    })
}


export function saveInfo(data: anyObj) {
    return createAxios({
        url: promotionUrl + 'createProjectInfo',
        method: 'post',
        data:data,
    },{
        showSuccessMessage: true,
    })
}

export function getAssetsData(data: anyObj){
    return createAxios({
        url: promotionUrl + 'getAssetsData',
        method: 'post',
        data:data,
    },{
        showSuccessMessage: true,
    })
}

export function getExternalAction(data: anyObj){
    return createAxios({
        url: promotionUrl + 'getExternalAction',
        method: 'post',
        data:data,
    },{
        showSuccessMessage: true,
    })
}
